home *** CD-ROM | disk | FTP | other *** search
/ Freelog 117 / FreelogNo117-OctobreNovembre2013.iso / Programmation / jedit / jedit5.1.0install.exe / {app} / modes / velocity_pure.xml < prev    next >
Extensible Markup Language  |  2013-07-28  |  3KB  |  117 lines

  1. <?xml version="1.0"?>
  2.  
  3. <!DOCTYPE MODE SYSTEM "xmode.dtd">
  4.  
  5. <!--
  6.  Mode definition for pure Velocity Template Language (VTL) highlighting
  7.   - In contrast to velocity.xml, there is no sgml highlighting!
  8.   - valid for jEdit 4.2, 4.3, 4.4 and 4.5.
  9.  
  10.  Extensions for jEdit's Templates Plugin 4.0.0 are also highlighted:
  11.   - Special directives and variables added.
  12.   - Embedded Beanshell scripts are highlighted as java.
  13.  
  14.  catalog entry recommended for Velocity Template files:
  15.  
  16.    <MODE NAME="velocity"
  17.          FILE="velocity_pure.xml"
  18.          FILE_NAME_GLOB="*.vm" />
  19.  
  20.  16.01.2012 Robert Schwenn
  21. -->
  22.  
  23. <MODE>
  24.  
  25.     <PROPS>
  26.         <PROPERTY NAME="commentStart" VALUE="#*" />
  27.         <PROPERTY NAME="commentEnd" VALUE="*#" />
  28.         <PROPERTY NAME="lineComment" VALUE="##" />
  29.         <!-- Auto indent -->
  30.         <PROPERTY NAME="indentNextLines" VALUE="^\s*(#(foreach|if|elseif|else|beanshell|macro))\s*\(.*\)\s*"/>
  31.         <PROPERTY NAME="unindentThisLine" VALUE="^\s*#(end|elseif|else)\b.*"/>
  32.     </PROPS>
  33.     
  34.   <RULES IGNORE_CASE="FALSE">
  35.  
  36.         <!-- VTL comment -->
  37.         <SPAN TYPE="COMMENT3">
  38.             <BEGIN>#**</BEGIN>
  39.             <END>*#</END>
  40.         </SPAN>
  41.  
  42.         <!-- multi-line comment -->
  43.         <SPAN TYPE="COMMENT1">
  44.             <BEGIN>#*</BEGIN>
  45.             <END>*#</END>
  46.         </SPAN>
  47.  
  48.         <!--single-line comment -->
  49.     <EOL_SPAN TYPE="COMMENT2">##</EOL_SPAN>
  50.     
  51.         
  52.         <!-- String -->
  53.     <SPAN TYPE="LITERAL1" NO_LINE_BREAK="TRUE">
  54.             <BEGIN>"</BEGIN>
  55.             <END>"</END>
  56.         </SPAN>
  57.  
  58.         <!-- Variable name -->
  59.     <SPAN TYPE="FUNCTION" NO_LINE_BREAK="TRUE">
  60.             <BEGIN>${</BEGIN>
  61.             <END>}</END>
  62.         </SPAN>
  63.     <SEQ_REGEXP HASH_CHAR="$" TYPE="FUNCTION">\$!?[A-z][A-z0-9._-]*</SEQ_REGEXP>
  64.  
  65.         <!-- Embedded Beanshell script -->
  66.     <SPAN TYPE="KEYWORD4" NO_LINE_BREAK="FALSE" DELEGATE="java::MAIN">
  67.             <BEGIN>#beanshell</BEGIN>
  68.             <END>#end</END>
  69.         </SPAN>
  70.     <!-- More correct, but the whole line after "#beanshell" is highlighted in one color:
  71.     <SPAN_REGEXP HASH_CHAR="#" TYPE="KEYWORD4" NO_LINE_BREAK="FALSE" DELEGATE="java::MAIN">
  72.             <BEGIN>#beanshell\s*\((true|false)?\)\s*</BEGIN>
  73.             <END>#end</END>
  74.         </SPAN_REGEXP>
  75.     -->
  76.  
  77.  
  78.         <KEYWORDS>
  79.       
  80.       <KEYWORD4>#macro</KEYWORD4>        <!-- Velocimacro block -->
  81.             <KEYWORD4>#beanshell</KEYWORD4>    <!-- beanshell block (jEdit-specific) -->
  82.       
  83.             <!-- Velocity directives, General -->
  84.       <KEYWORD1>#set</KEYWORD1>
  85.             <KEYWORD1>#parse</KEYWORD1>
  86.             <KEYWORD1>#include</KEYWORD1>
  87.             <KEYWORD1>#stop</KEYWORD1>
  88.       
  89.             <!-- Velocity directives, Flow control -->
  90.             <KEYWORD3>#if</KEYWORD3>
  91.             <KEYWORD3>#else</KEYWORD3>
  92.             <KEYWORD3>#elseif</KEYWORD3>
  93.             <KEYWORD3>#foreach</KEYWORD3>
  94.             <KEYWORD3>in</KEYWORD3>
  95.             <KEYWORD3>#end</KEYWORD3>
  96.       
  97.             <!-- Velocity directives, jEdit-specific -->
  98.             <LITERAL2>#prompt</LITERAL2>
  99.             <LITERAL2>#yes_no</LITERAL2>
  100.             <LITERAL2>#today</LITERAL2>
  101.             <LITERAL2>#caret</LITERAL2>
  102.             <LITERAL2>#buffermode</LITERAL2>
  103.       
  104.             <!-- jEdit-specific variables -->
  105.       <KEYWORD2>_jeditIndentation</KEYWORD2>
  106.             <KEYWORD2>_jeditSelection</KEYWORD2>
  107.             <KEYWORD2>_jeditTab</KEYWORD2>
  108.             <KEYWORD2>buffer</KEYWORD2>
  109.             <KEYWORD2>textarea</KEYWORD2>
  110.             <KEYWORD2>view</KEYWORD2>
  111.       
  112.         </KEYWORDS>
  113.     
  114.     </RULES>
  115.  
  116. </MODE>
  117.